from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from info import create_app, db,models

# 通过指定的配置名称创建对应的配置app
app = create_app("development")

manager = Manager(app)

# 将app与db关联
Migrate(app,db)

# 将迁移命令添加到manager
manager.add_command('db',MigrateCommand)


# @app.route('/')
# def index():
#     # session['name'] = "itheima"
#
#     logging.debug('测试debug')
#     logging.warning('测试warning')
#     logging.error('测试error')
#     logging.fatal('测试fatal')
#
#
#     return 'index333'



if __name__ == '__main__':
   manager.run()